

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=dark>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/memory_blog/img/fluid.png">
  <link rel="icon" href="/memory_blog/img/icon/dw.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="Memory">
  <meta name="keywords" content="">
  
    <meta name="description" content="🍛 逐步学习Linux基础命令，包括文本处理、文件压缩、系统监控等，助你在命令行环境下发挥更大的能力">
<meta property="og:type" content="article">
<meta property="og:title" content="掌握Linux基础命令：入门到实践">
<meta property="og:url" content="https://test.atomgit.net/memory_blog/2023/03/22/%E6%8E%8C%E6%8F%A1%20Linux%20%E5%9F%BA%E7%A1%80%E5%91%BD%E4%BB%A4%EF%BC%9A%E5%85%A5%E9%97%A8%E5%88%B0%E5%AE%9E%E8%B7%B5/index.html">
<meta property="og:site_name" content="Memory&#39;s blog">
<meta property="og:description" content="🍛 逐步学习Linux基础命令，包括文本处理、文件压缩、系统监控等，助你在命令行环境下发挥更大的能力">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://test.atomgit.net/memory_blog/img/artical/sea2.jpg">
<meta property="article:published_time" content="2023-03-22T13:31:48.000Z">
<meta property="article:modified_time" content="2023-05-28T03:07:48.000Z">
<meta property="article:author" content="Memory">
<meta property="article:tag" content="经验">
<meta property="article:tag" content="Linux">
<meta property="article:tag" content="操作系统">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://test.atomgit.net/memory_blog/img/artical/sea2.jpg">
  
  
  
  <title>掌握Linux基础命令：入门到实践 - Memory&#39;s blog</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/memory_blog/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/memory_blog/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/memory_blog/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"test.atomgit.net","root":"/memory_blog/","version":"1.9.4","typing":{"enable":true,"typeSpeed":100,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":false,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":true,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/memory_blog/local-search.xml"};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/memory_blog/js/utils.js" ></script>
  <script  src="/memory_blog/js/color-schema.js" ></script>
  

  

  

  

  

  

  

  



  
<meta name="generator" content="Hexo 5.4.2"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 75vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/memory_blog/">
      <strong>Memory&#39;s blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/memory_blog/">
                <i class="iconfont icon-home-fill"></i>
                <span>首页</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/memory_blog/archives/">
                <i class="iconfont icon-archive-fill"></i>
                <span>归档</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/memory_blog/categories/">
                <i class="iconfont icon-category-fill"></i>
                <span>分类</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/memory_blog/tags/">
                <i class="iconfont icon-tags-fill"></i>
                <span>标签</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/memory_blog/about/">
                <i class="iconfont icon-user-fill"></i>
                <span>关于</span>
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/memory_blog/links/">
                <i class="iconfont icon-link-fill"></i>
                <span>友链</span>
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              <i class="iconfont icon-search"></i>
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">
              <i class="iconfont icon-dark" id="color-toggle-icon"></i>
            </a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/memory_blog/img/newBG/girl.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="掌握Linux基础命令：入门到实践"></span>
          
        </div>

        
          
  <div class="mt-3">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-author" aria-hidden="true"></i>
        Memory
      </span>
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2023-03-22 21:31" pubdate>
          2023年3月22日 晚上
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          3.9k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          10 分钟
        
      </span>
    

    
    
      
        <span id="leancloud-page-views-container" class="post-meta" style="display: none">
          <i class="iconfont icon-eye" aria-hidden="true"></i>
          <span id="leancloud-page-views"></span> 次
        </span>
        
      
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar category-bar" style="margin-right: -1rem">
    





<div class="category-list">
  
  
    
    
    
    <div class="category row nomargin-x">
      <a class="category-item 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="Linux"
        id="heading-edc9f0a5a5d57797bf68e37364743831" role="tab" data-toggle="collapse" href="#collapse-edc9f0a5a5d57797bf68e37364743831"
        aria-expanded="true"
      >
        Linux
        <span class="list-group-count">(1)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-edc9f0a5a5d57797bf68e37364743831"
           role="tabpanel" aria-labelledby="heading-edc9f0a5a5d57797bf68e37364743831">
        
        
          
          
  <div class="category-post-list">
    
    
  </div>

          
  
    
    
    
    <div class="category-sub row nomargin-x">
      <a class="category-subitem 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="操作系统"
        id="heading-30d23ef4f49e85f37f54786ff984032c" role="tab" data-toggle="collapse" href="#collapse-30d23ef4f49e85f37f54786ff984032c"
        aria-expanded="true"
      >
        操作系统
        <span class="list-group-count">(1)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-30d23ef4f49e85f37f54786ff984032c"
           role="tabpanel" aria-labelledby="heading-30d23ef4f49e85f37f54786ff984032c">
        
        
          
          
  <div class="category-post-list">
    
    
  </div>

          
  
    
    
    
    <div class="category-sub row nomargin-x">
      <a class="category-subitem 
          list-group-item category-item-action col-10 col-md-11 col-xm-11" title="经验"
        id="heading-32a8e000e928e6dc255876d9fc0178b3" role="tab" data-toggle="collapse" href="#collapse-32a8e000e928e6dc255876d9fc0178b3"
        aria-expanded="true"
      >
        经验
        <span class="list-group-count">(1)</span>
        <i class="iconfont icon-arrowright"></i>
      </a>
      
      <div class="category-collapse collapse show" id="collapse-32a8e000e928e6dc255876d9fc0178b3"
           role="tabpanel" aria-labelledby="heading-32a8e000e928e6dc255876d9fc0178b3">
        
        
          
  <div class="category-post-list">
    
    
      
      
        <a href="/memory_blog/2023/03/22/%E6%8E%8C%E6%8F%A1%20Linux%20%E5%9F%BA%E7%A1%80%E5%91%BD%E4%BB%A4%EF%BC%9A%E5%85%A5%E9%97%A8%E5%88%B0%E5%AE%9E%E8%B7%B5/" title="掌握Linux基础命令：入门到实践"
           class="list-group-item list-group-item-action
           active">
          <span class="category-post">掌握Linux基础命令：入门到实践</span>
        </a>
      
    
  </div>

        
      </div>
    </div>
  
        
      </div>
    </div>
  
        
      </div>
    </div>
  
</div>


  </aside>


    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">掌握Linux基础命令：入门到实践</h1>
            
              <p class="note note-success">
                
                  
                    本文最后更新于：1 年前
                  
                
              </p>
            
            
              <div class="markdown-body">
                
                <h1 id="导言"><a href="#导言" class="headerlink" title="导言"></a>导言</h1><ul>
<li><h5 id="Linux是一种开源操作系统，它提供了丰富的命令行工具来管理和操作系统"><a href="#Linux是一种开源操作系统，它提供了丰富的命令行工具来管理和操作系统" class="headerlink" title="Linux是一种开源操作系统，它提供了丰富的命令行工具来管理和操作系统"></a>Linux是一种开源操作系统，它提供了丰富的命令行工具来管理和操作系统</h5></li>
<li><h5 id="本文将快速介绍一些常用的Linux命令"><a href="#本文将快速介绍一些常用的Linux命令" class="headerlink" title="本文将快速介绍一些常用的Linux命令"></a>本文将快速介绍一些常用的Linux命令</h5></li>
<li><p>Linux 命令在线速查手册：<a target="_blank" rel="noopener" href="https://wangchujiang.com/linux-command/">Linux 命令在线速查手册</a>  ✔<strong>（2023/11/11早）</strong></p>
</li>
</ul>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/aahwj/article/details/132819154">Linux系统下Node.js的安装步骤_linux 安装node.js-CSDN博客</a></p>
<p><a target="_blank" rel="noopener" href="http://www.hostbuf.com/?install_fs">FinalShell官网 (hostbuf.com)</a></p>
<h1 id="正文"><a href="#正文" class="headerlink" title="正文"></a>正文</h1><h2 id="一次性学会68个常用命令"><a href="#一次性学会68个常用命令" class="headerlink" title="一次性学会68个常用命令"></a>一次性学会68个常用命令</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs BASH"><span class="hljs-built_in">ls</span> -l -a<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">cd</span> /  <span class="hljs-built_in">cd</span> /root    <span class="hljs-built_in">cd</span> /home/memory<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">pwd</span><br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">touch</span> atext btext c<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">cat</span> sb.txt<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">echo</span> 哈哈哈	<span class="hljs-built_in">echo</span> how are you &gt; sb.txt<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">nano sb.txt<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">vim sb.txt<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">shred</span> 慎用，转换文本为乱码，但是操作菜单都成乱码了，只能重启<br></code></pre></td></tr></table></figure>

<figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs arduino">mkdir newdic<br></code></pre></td></tr></table></figure>

<figure class="highlight haxe"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs haxe">cp atext <span class="hljs-keyword">new</span><span class="hljs-type">dic</span> atext2<br></code></pre></td></tr></table></figure>

<figure class="highlight haxe"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs haxe">mv btext c <span class="hljs-keyword">new</span><span class="hljs-type">dic</span>/<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">rm</span> dfsfff<br></code></pre></td></tr></table></figure>

<figure class="highlight haxe"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs haxe">rmdir <span class="hljs-keyword">new</span><span class="hljs-type">dir</span>/<br></code></pre></td></tr></table></figure>

<figure class="highlight haxe"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs haxe">rm -R <span class="hljs-keyword">new</span><span class="hljs-type">dir</span>/  递归删除目录<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004142717334.png" alt="image-20231004142717334"></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">ln</span> -s ../sb.txt sb3.txt <br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004143207735.png" alt="image-20231004143207735"></p>
<figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs arduino">clear<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">whoami</span><br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">useradd tom</span><br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">adduser mike</span><br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">sudo useradd tom</span><br></code></pre></td></tr></table></figure>

<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs stata"><span class="hljs-keyword">su</span> root		<span class="hljs-keyword">su</span> tom<br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">sudo passwd nick</span><br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">whatis <span class="hljs-built_in">pwd</span>		后面加个命令，他会告诉你这个命令是干啥用的<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004145302771.png" alt="image-20231004145302771"></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">which</span> <span class="hljs-built_in">pwd</span><br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">whereis <span class="hljs-built_in">pwd</span><br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004145241428.png" alt="image-20231004145241428"></p>
<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">wget</span><br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">curl</span><br></code></pre></td></tr></table></figure>

<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs python"><span class="hljs-built_in">zip</span> xxx.<span class="hljs-built_in">zip</span>  myapp		压缩<br></code></pre></td></tr></table></figure>

<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs nginx"><span class="hljs-attribute">unzip</span> xxx.zip 		解压<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">cat</span> less <span class="hljs-built_in">head</span> <span class="hljs-built_in">tail</span><br></code></pre></td></tr></table></figure>

<figure class="highlight armasm"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs armasm"><span class="hljs-keyword">cmp</span> c.txt <span class="hljs-built_in">sb</span>.txt		比较两文件是否相同<br></code></pre></td></tr></table></figure>

<figure class="highlight mipsasm"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs mipsasm"><span class="hljs-keyword">diff </span>c.txt <span class="hljs-keyword">sb.txt	</span>	更详细的比较<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004145843352.png" alt="image-20231004145843352"></p>
<figure class="highlight vim"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs vim"><span class="hljs-keyword">cat</span> <span class="hljs-keyword">sb</span>.txt | <span class="hljs-keyword">sort</span>		排序显示文本<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004150036403.png" alt="image-20231004150036403"></p>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs routeros"><span class="hljs-built_in">find</span> / -name <span class="hljs-string">&quot;a&quot;</span>   sudo <span class="hljs-built_in">find</span> / -name <span class="hljs-string">&quot;a&quot;</span>		按文件名查找，指定目录<br></code></pre></td></tr></table></figure>

<figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs routeros"><span class="hljs-built_in">find</span> -name <span class="hljs-string">&quot;a&quot;</span>		默认当前目录下<br></code></pre></td></tr></table></figure>

<figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs routeros"><span class="hljs-built_in">find</span> -name <span class="hljs-string">&quot;a*&quot;</span>	   <span class="hljs-built_in">find</span> -name <span class="hljs-string">&quot;*a&quot;</span>		通配符 以a为开头 / 以a为结尾<br></code></pre></td></tr></table></figure>

<figure class="highlight llvm"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs llvm">chmod +<span class="hljs-keyword">x</span> <span class="hljs-keyword">c</span>.txt    修改权限<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">chown</span>	修改所有权<br></code></pre></td></tr></table></figure>

<figure class="highlight mipsasm"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs mipsasm"><span class="hljs-keyword">ll </span> 查看详细信息，包括文件所有权<br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">ifconfig</span>		<br></code></pre></td></tr></table></figure>

<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs css">ip <span class="hljs-selector-tag">address</span><br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004152429614.png" alt="image-20231004152429614"></p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004152435529.png" alt="image-20231004152435529"></p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004152707721.png" alt="image-20231004152707721"></p>
<figure class="highlight autoit"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs autoit"><span class="hljs-built_in">ping</span> www.baidu.com<br></code></pre></td></tr></table></figure>

<figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-attribute">ping</span> -c <span class="hljs-number">5</span> -s <span class="hljs-number">20</span> www.baidu.com		指定发送数据包数量、大小<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004153027133.png" alt="image-20231004153027133"></p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs nginx"><span class="hljs-attribute">netstat</span>			查看端口占用情况<br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">netstat -tulpn</span><br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004154307867.png" alt="image-20231004154307867"></p>
<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">ss</span><br></code></pre></td></tr></table></figure>

<figure class="highlight ebnf"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs ebnf"><span class="hljs-attribute">ss -tulpn</span><br></code></pre></td></tr></table></figure>

<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs css">sudo iptables -<span class="hljs-selector-tag">I</span> <span class="hljs-selector-tag">INPUT</span> -<span class="hljs-selector-tag">p</span> tcp -m tcp <span class="hljs-attr">--dport</span> <span class="hljs-number">80</span> -j ACCEPT		开放指定端口<br></code></pre></td></tr></table></figure>

<figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-attribute">sudo</span> ufw <span class="hljs-literal">allow</span> <span class="hljs-number">80</span>		sudo ufw status      sudo ufw enable<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">uname</span>		查看系统信息<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">uname</span> -a	系统详细信息<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004154914080.png" alt="image-20231004154914080"></p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs nginx"><span class="hljs-attribute">neofetch</span>		需要安装<br></code></pre></td></tr></table></figure>

<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs nginx"><span class="hljs-attribute">cal</span>		日历<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155130230.png" alt="image-20231004155130230"></p>
<figure class="highlight subunit"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs subunit">echo &quot;1<span class="hljs-string">+2</span><span class="hljs-string">+3</span><span class="hljs-string">+4</span><span class="hljs-string">+5</span>&quot; | bc		计算<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155223354.png" alt="image-20231004155223354"></p>
<figure class="highlight gams"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs gams"><span class="hljs-keyword">free</span>		内存空间占用情况<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155301145.png" alt="image-20231004155301145"></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">df</span>		<span class="hljs-built_in">df</span> -H<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155406561.png" alt="image-20231004155406561"></p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs nginx"><span class="hljs-attribute">ps</span>		进程管理<br></code></pre></td></tr></table></figure>

<figure class="highlight dos"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs dos">ps -<span class="hljs-built_in">aux</span>		更详细的进程信息<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155505958.png" alt="image-20231004155505958"></p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155522343.png" alt="image-20231004155522343"></p>
<figure class="highlight coq"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs coq"><span class="hljs-built_in">top</span>			任务管理<br></code></pre></td></tr></table></figure>

<figure class="highlight nginx"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs nginx"><span class="hljs-attribute">htop</span> 	需安装<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155713184.png" alt="image-20231004155713184"></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">kill</span> 		根据pid杀掉进程<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004155927003.png" alt="image-20231004155927003"></p>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs awk">systemctl start <span class="hljs-regexp">/ stop /</span> status / enable<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20231004160043296.png" alt="image-20231004160043296"></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">history</span>		历史输入命令<br></code></pre></td></tr></table></figure>

<figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs arduino">sudo shutdown		sudo shutdown -h now		关机<br></code></pre></td></tr></table></figure>

<h2 id="命令"><a href="#命令" class="headerlink" title="命令"></a>命令</h2><h3 id="通用格式"><a href="#通用格式" class="headerlink" title="通用格式"></a>通用格式</h3><figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs css">command <span class="hljs-selector-attr">[-options]</span> <span class="hljs-selector-attr">[parameter]</span><br></code></pre></td></tr></table></figure>

<figure class="highlight markdown"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs markdown">command : 命令本身<br>-options : 选项[可选] <br>parameter : 参数[可选]<br></code></pre></td></tr></table></figure>

<h3 id="目录操作命令"><a href="#目录操作命令" class="headerlink" title="目录操作命令"></a>目录操作命令</h3><ul>
<li><h5 id="ls-列出目录"><a href="#ls-列出目录" class="headerlink" title="ls - 列出目录"></a>ls - 列出目录</h5></li>
</ul>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs sql">ls [<span class="hljs-operator">-</span>a <span class="hljs-operator">-</span>l <span class="hljs-operator">-</span>h] [Linux路径]<br></code></pre></td></tr></table></figure>

<figure class="highlight ada"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs ada">-a : 列出全部文件, 包含隐藏的文件/文件夹<br>-l : 纵向形式排列信息<br>-h : 列出文件大小, 与-<span class="hljs-type">l</span>配合使用<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="cd-切换工作目录-Change-Directory"><a href="#cd-切换工作目录-Change-Directory" class="headerlink" title="cd - 切换工作目录  (Change Directory)"></a>cd - 切换工作目录  (Change Directory)</h5></li>
</ul>
<figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-attribute">cd</span><span class="hljs-meta"> [Linux路径]</span><br></code></pre></td></tr></table></figure>

<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs awk">cd   回到用户的HOME目录 <span class="hljs-regexp">/home/m</span>emory<br></code></pre></td></tr></table></figure>

<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs awk">cd <span class="hljs-regexp">/ 回到根目录 /</span><br></code></pre></td></tr></table></figure>

<figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs jboss-cli">注:  / 表示根目录 <br>	~/ 表示 <span class="hljs-string">/home/memory</span> <br>    <span class="hljs-string">./</span> 表示当前目录<br>    <span class="hljs-string">../</span> 表示上一级目录<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="pwd-查看当前工作目录-Print-Work-Directory"><a href="#pwd-查看当前工作目录-Print-Work-Directory" class="headerlink" title="pwd - 查看当前工作目录  (Print Work Directory)"></a>pwd - 查看当前工作目录  (Print Work Directory)</h5></li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">pwd</span> 无选项 无参数<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="mkdir-创建目录-Make-Directory"><a href="#mkdir-创建目录-Make-Directory" class="headerlink" title="mkdir - 创建目录  (Make Directory)"></a>mkdir - 创建目录  (Make Directory)</h5></li>
</ul>
<figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs arduino">mkdir [-p] Linux路径<br></code></pre></td></tr></table></figure>

<figure class="highlight ada"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs ada">-p : 选填, 可创建多级目录<br>Linux路径 : 必填<br></code></pre></td></tr></table></figure>

<h3 id="文件操作命令"><a href="#文件操作命令" class="headerlink" title="文件操作命令"></a>文件操作命令</h3><ul>
<li><h5 id="touch-创建文件"><a href="#touch-创建文件" class="headerlink" title="touch - 创建文件"></a>touch - 创建文件</h5></li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">touch</span> Linux路径<br></code></pre></td></tr></table></figure>

<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs">无选项 参数必填 <br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="cat-查看文件内容"><a href="#cat-查看文件内容" class="headerlink" title="cat - 查看文件内容"></a>cat - 查看文件内容</h5></li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">cat</span> Linux路径<br></code></pre></td></tr></table></figure>

<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs">无选项 参数必填<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="more-查看文件内容-可翻页查看-空格翻页-q退出"><a href="#more-查看文件内容-可翻页查看-空格翻页-q退出" class="headerlink" title="more - 查看文件内容  (可翻页查看, 空格翻页, q退出)"></a>more - 查看文件内容  (可翻页查看, 空格翻页, q退出)</h5></li>
</ul>
<figure class="highlight dos"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs dos"><span class="hljs-built_in">more</span> Linux路径<br></code></pre></td></tr></table></figure>

<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs">无选项 参数必填<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="cp-复制文件-文件夹-copy"><a href="#cp-复制文件-文件夹-copy" class="headerlink" title="cp - 复制文件/文件夹  (copy)"></a>cp - 复制文件/文件夹  (copy)</h5></li>
</ul>
<figure class="highlight avrasm"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs avrasm"><span class="hljs-keyword">cp</span> [-r] 参数一 参数二<br></code></pre></td></tr></table></figure>

<figure class="highlight ada"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs ada">-r : 可选, 复制文件夹时使用<br>参数一 : <span class="hljs-type">Linux</span>路径, 表示被复制的文件或文件夹<br>参数二 : <span class="hljs-type">Linux</span>路径, 表示要复制去的地方<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="rm-删除文件-文件夹-remove"><a href="#rm-删除文件-文件夹-remove" class="headerlink" title="rm - 删除文件/文件夹  (remove)"></a>rm - 删除文件/文件夹  (remove)</h5></li>
</ul>
<figure class="highlight prolog"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs prolog">rm [-r -f] 参数一 参数二 ......<br></code></pre></td></tr></table></figure>

<figure class="highlight ada"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs ada">-r : 删除文件夹时使用<br>-f : 强制删除 (<span class="hljs-type">force</span>)<br>参数 : 要删除的文件/文件夹路径<br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="mv-移动文件-文件夹-move"><a href="#mv-移动文件-文件夹-move" class="headerlink" title="mv - 移动文件/文件夹 (move)"></a>mv - 移动文件/文件夹 (move)</h5></li>
</ul>
<figure class="highlight arduino"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs arduino">move 参数一 参数二<br></code></pre></td></tr></table></figure>

<figure class="highlight ada"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs ada">参数一 : <span class="hljs-type">Linux</span>路径, 表示被移动的文件或文件夹<br>参数二 : <span class="hljs-type">Linux</span>路径, 表示移动去的地方, <br></code></pre></td></tr></table></figure>

<h3 id="归档管理"><a href="#归档管理" class="headerlink" title="归档管理"></a>归档管理</h3><h4 id="tar-命令"><a href="#tar-命令" class="headerlink" title="tar 命令"></a>tar 命令</h4><ul>
<li><h5 id="gzip-格式压缩文件"><a href="#gzip-格式压缩文件" class="headerlink" title="gzip 格式压缩文件"></a>gzip 格式压缩文件</h5></li>
</ul>
<figure class="highlight awk"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs awk">tar -zcvf test.tar.gz <span class="hljs-regexp">/root/</span>test<br></code></pre></td></tr></table></figure>

<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs diff"><span class="hljs-deletion">-c: 创建文件</span><br><span class="hljs-deletion">-v: 显示执行过程</span><br><span class="hljs-deletion">-z: 用gzip压缩</span><br><span class="hljs-deletion">-f: 压缩的包名，必须放到所有选项后面</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="查看压缩文件"><a href="#查看压缩文件" class="headerlink" title="查看压缩文件"></a>查看压缩文件</h5></li>
</ul>
<figure class="highlight cmake"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs cmake">tar -tf <span class="hljs-keyword">test</span>.tar.gz<br></code></pre></td></tr></table></figure>

<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs diff"><span class="hljs-deletion">-t: 显示归档文件中的文件列表，后面紧跟-f</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="解压文件"><a href="#解压文件" class="headerlink" title="解压文件"></a>解压文件</h5></li>
</ul>
<figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs stylus">tar -xzvf test<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span> <br>tar -xzvf test<span class="hljs-selector-class">.tar</span><span class="hljs-selector-class">.gz</span> -C /home/<br></code></pre></td></tr></table></figure>

<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs diff"><span class="hljs-deletion">-x: 解压，不能与-c同时出现</span><br><span class="hljs-deletion">-C: 解压到指定目录</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="排除不需要压缩的文件"><a href="#排除不需要压缩的文件" class="headerlink" title="排除不需要压缩的文件"></a>排除不需要压缩的文件</h5></li>
</ul>
<figure class="highlight cmake"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><code class="hljs cmake"><span class="hljs-comment"># 排除某个文件</span><br>tar -zcvf <span class="hljs-keyword">test</span>.tar.gz --exclude=<span class="hljs-keyword">test</span>.sh <span class="hljs-keyword">test</span><br><span class="hljs-comment"># 排除某个目录</span><br>tar -zcvf <span class="hljs-keyword">test</span>.tar.gz --exclude=bak <span class="hljs-keyword">test</span><br></code></pre></td></tr></table></figure>

<h4 id="zip-命令"><a href="#zip-命令" class="headerlink" title="zip 命令"></a>zip 命令</h4><ul>
<li><h5 id="压缩文件"><a href="#压缩文件" class="headerlink" title="压缩文件"></a>压缩文件</h5></li>
</ul>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs stata"><span class="hljs-keyword">zip</span> -r <span class="hljs-keyword">test</span>.<span class="hljs-keyword">zip</span> /root/<span class="hljs-keyword">test</span><br></code></pre></td></tr></table></figure>

<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs diff"><span class="hljs-deletion">-r: 递归处理，把目录和文件一起处理，显示压缩过程</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="更新压缩包文件"><a href="#更新压缩包文件" class="headerlink" title="更新压缩包文件"></a>更新压缩包文件</h5></li>
</ul>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs python"><span class="hljs-comment"># 从压缩包中删除指定文件，如果指定文件不存在，不做任何改动</span><br><span class="hljs-built_in">zip</span> -d test.<span class="hljs-built_in">zip</span> a.txt<br></code></pre></td></tr></table></figure>

<h4 id="unzip-命令"><a href="#unzip-命令" class="headerlink" title="unzip 命令"></a>unzip 命令</h4><ul>
<li><h5 id="查看压缩包内文件"><a href="#查看压缩包内文件" class="headerlink" title="查看压缩包内文件"></a>查看压缩包内文件</h5></li>
</ul>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs stata">unzip -<span class="hljs-keyword">l</span> <span class="hljs-keyword">test</span>.<span class="hljs-keyword">zip</span><br></code></pre></td></tr></table></figure>

<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs diff"><span class="hljs-deletion">-l: 可清晰地看到zip文件内的详细信息</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="查看有无文件"><a href="#查看有无文件" class="headerlink" title="查看有无文件"></a>查看有无文件</h5></li>
</ul>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs stata">unzip -t <span class="hljs-keyword">test</span>.<span class="hljs-keyword">zip</span><br></code></pre></td></tr></table></figure>

<figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs diff"><span class="hljs-deletion">-t: 显示OK则说明无损坏</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="解压文件-1"><a href="#解压文件-1" class="headerlink" title="解压文件"></a>解压文件</h5></li>
</ul>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs stata">unzip <span class="hljs-keyword">test</span>.<span class="hljs-keyword">zip</span><br></code></pre></td></tr></table></figure>

<ul>
<li><h5 id="解压到特定目录"><a href="#解压到特定目录" class="headerlink" title="解压到特定目录"></a>解压到特定目录</h5></li>
</ul>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs stata">unzip <span class="hljs-keyword">test</span>.<span class="hljs-keyword">zip</span> -<span class="hljs-keyword">d</span> <span class="hljs-keyword">test</span><br>unzip -<span class="hljs-keyword">d</span> <span class="hljs-keyword">test</span> <span class="hljs-keyword">test</span>.<span class="hljs-keyword">zip</span><br></code></pre></td></tr></table></figure>

<h2 id="学习"><a href="#学习" class="headerlink" title="学习"></a>学习</h2><blockquote>
<p>2024年5月16日</p>
</blockquote>
<p>最近学习操作系统：[11 高级技巧之日志分析：利用 Linux 指令分析 Web 日志 (lianglianglee.com)](<a target="_blank" rel="noopener" href="https://learn.lianglianglee.com/%E4%B8%93%E6%A0%8F/%E9%87%8D%E5%AD%A6%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F-%E5%AE%8C/11">https://learn.lianglianglee.com/专栏/重学操作系统-完/11</a>  高级技巧之日志分析：利用 Linux 指令分析 Web 日志.md)</p>
<p><img src="C:\Users\Lenovo\AppData\Roaming\Typora\typora-user-images\image-20240516113705582.png" alt="image-20240516113705582"></p>
<p>我在使用 yum 安装 htop，看看安装完成后的使用效果吧</p>
<p>执行以下命令，效果还不错：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">sudo yum install htop <br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">htop<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240516113918242.png" alt="image-20240516113918242"></p>
<h2 id="本机安装虚拟机"><a href="#本机安装虚拟机" class="headerlink" title="本机安装虚拟机"></a>本机安装虚拟机</h2><blockquote>
<p>2024年5月28日</p>
</blockquote>
<h3 id="初始化"><a href="#初始化" class="headerlink" title="初始化"></a>初始化</h3><p>下载安装 VM Ware：</p>
<p>下载安装 Ubuntu 镜像：<a target="_blank" rel="noopener" href="http://releases.ubuntu.com/">Ubuntu Releases</a></p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240528100447611.png" alt="image-20240528100447611"></p>
<p>更改分辨率，下载语言包，更改时区等</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240528103406006.png" alt="image-20240528103406006"></p>
<p>Ctrl + Alt + t，打开终端，使用 apt 包管理器尝试安装 Docker：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">lisudo apt install docker.io<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">docker -v<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">sudo docker run hello-world<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240528104339617.png" alt="image-20240528104339617"></p>
<h3 id="远程连接"><a href="#远程连接" class="headerlink" title="远程连接"></a>远程连接</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">ifconfig<br></code></pre></td></tr></table></figure>

<p>win + ip，也可以直接查看 IP 地址</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240528104718587.png" alt="image-20240528104718587"></p>
<p>检查一下本机（windows 操作系统）能不能 ping 通 虚拟机：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240528104904570.png" alt="image-20240528104904570"></p>
<p>安装 ssh 远程连接服务：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">sudo apt-get install openssh-server<br></code></pre></td></tr></table></figure>

<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">ps -ef | grep ssh<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240528105309108.png" alt="image-20240528105309108"></p>
<p>当然，如果服务没有正常启动，启动就可以：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">sudo ssh run<br></code></pre></td></tr></table></figure>

<p>更新软件包：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">sudo apt update<br></code></pre></td></tr></table></figure>

<p>安装 Java 8 环境：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">sudo apt install openjdk-8-jdk<br></code></pre></td></tr></table></figure>

<p>查看是否安装成功：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">java -version<br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240528105540192.png" alt="image-20240528105540192"></p>
<p>首先配置文件同步：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529094857586.png" alt="image-20240529094857586"></p>
<p>输入指定连接的 Linux 服务器主机名、用户名和密码，成功连接。</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529100151507.png" alt="image-20240529100151507"></p>
<p>这样就能看到 linux 服务器上的目录了：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529094857586.png"></p>
<p>没有这个右侧边栏，可以选择在菜单栏里找到并选择显示：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529100552713.png" alt="image-20240529100552713"></p>
<p>远程连接配置完毕，我们需要实现把 window 上的文件，自动同步到 linux 虚拟机的文件目录中。</p>
<h3 id="文件同步"><a href="#文件同步" class="headerlink" title="文件同步"></a>文件同步</h3><p>指定要将本机的哪个目录下的文件，同步到 linux 的哪个目录下：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529101215081.png" alt="image-20240529101215081"></p>
<p>同步部署文件到 linux 虚拟机上：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529101522319.png" alt="image-20240529101522319"></p>
<p>这里会显示出未同步的文件，可以挨个检查同步，也可以一键同步所有文件：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529101416092.png" alt="image-20240529101416092"></p>
<p>同步完成，查看下 linux 虚拟机中的文件：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529101857983.png" alt="image-20240529101857983"></p>
<p>可以看到所有代码文件已经同步完成，还可以开启自动同步，无需手动操作：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529101802814.png" alt="image-20240529101802814"></p>
<p>那我们在项目根路径下新建文件 hello.txt，填写文件内容后保存。</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529102128675.png" alt="image-20240529102128675"></p>
<p>直接就能在 linux 虚拟机中看到文件已经自动同步过来了：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529102107829.png" alt="image-20240529102107829"></p>
<p>在 options 下还有很多可以修改的设置，比如删除本地文件是是否需要同步删除远程，而不用给提示：</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529102253345.png" alt="image-20240529102253345"></p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529102312930.png" alt="image-20240529102312930"></p>
<h3 id="项目启动"><a href="#项目启动" class="headerlink" title="项目启动"></a>项目启动</h3><p>在 IDEA 中找到 linux 虚拟机对应终端窗口，直接输入命令，尝试在 linux 服务器中启动项目：</p>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs stata">mvn spring-<span class="hljs-keyword">boot</span>:<span class="hljs-keyword">run</span><br></code></pre></td></tr></table></figure>

<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529102807458.png" alt="image-20240529102807458"></p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529102647088.png" alt="image-20240529102647088"></p>
<p>可以看到虚拟机内正在下载拉取依赖包，等待项目启动中……</p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529102913875.png" alt="image-20240529102913875"></p>
<p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/chenyablog/p/15392352.html">No plugin found for prefix spring-boot in the current project and in the plugin groups 异常解决 - 小旭的blog - 博客园 (cnblogs.com)</a></p>
<p><img src="https://gitee.com/deng-2022/pictures/raw/master/images/image-20240529103358169.png" alt="image-20240529103358169"></p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/memory_blog/categories/Linux/" class="category-chain-item">Linux</a>
  
  
    <span>></span>
    
  <a href="/memory_blog/categories/Linux/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" class="category-chain-item">操作系统</a>
  
  
    <span>></span>
    
  <a href="/memory_blog/categories/Linux/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E7%BB%8F%E9%AA%8C/" class="category-chain-item">经验</a>
  
  

  

  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/memory_blog/tags/%E7%BB%8F%E9%AA%8C/">#经验</a>
      
        <a href="/memory_blog/tags/Linux/">#Linux</a>
      
        <a href="/memory_blog/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/">#操作系统</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>掌握Linux基础命令：入门到实践</div>
      <div>https://test.atomgit.net/memory_blog/2023/03/22/掌握 Linux 基础命令：入门到实践/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>Memory</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2023年3月22日</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>更新于</div>
          <div>2023年5月28日</div>
        </div>
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/memory_blog/2023/03/23/%E6%8E%A2%E7%B4%A2%E6%88%91%E7%9A%84%E5%8D%9A%E5%AE%A2%E4%B8%96%E7%95%8C%20-%20%E4%B8%AA%E4%BA%BA%E5%AF%BC%E8%AF%BB/" title="探索我的博客世界 - 个人导读">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">探索我的博客世界 - 个人导读</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/memory_blog/2023/03/22/MySQL%E4%BB%8E%E5%85%A5%E9%97%A8%E5%88%B0%E5%85%A5%E5%9C%9F/" title="MySQL从入门到入土">
                        <span class="hidden-mobile">MySQL从入门到入土</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
  
  
    <article id="comments">
      

    </article>
  


          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header">
    <i class="iconfont icon-list"></i>
    <span>目录</span>
  </p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.fluid-dev.com/docs/guide/" target="_blank" rel="nofollow noopener"> <span>Memory | 个人文档站点</span> </a>
<i class="iconfont icon-love"></i> <a href="https://hexo.fluid-dev.com/docs/guide/" target="_blank" rel="nofollow noopener"> <span>配置指南 | Hexo Fluid 用户手册</span> </a>   
    </div>
  
  
    <div class="statistics">
  
  

  
    
      <span id="leancloud-site-pv-container" style="display: none">
        总访问量 
        <span id="leancloud-site-pv"></span>
         次
      </span>
    
    
      <span id="leancloud-site-uv-container" style="display: none">
        总访客数 
        <span id="leancloud-site-uv"></span>
         人
      </span>
    
    

  
</div>

  
  
    <!-- 备案信息 ICP for China -->
    <div class="beian">
  <span>
    <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow noopener">
      京ICP证123456号
    </a>
  </span>
  
    
      <span>
        <a
          href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12345678"
          rel="nofollow noopener"
          class="beian-police"
          target="_blank"
        >
          
            <span style="visibility: hidden; width: 0">|</span>
            <img src="/memory_blog/img/police_beian.png" alt="police-icon"/>
          
          <span>京公网安备12345678号</span>
        </a>
      </span>
    
  
</div>

  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/memory_blog/js/events.js" ></script>
<script  src="/memory_blog/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>







  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/memory_blog/js/local-search.js" ></script>

  <script defer src="/memory_blog/js/leancloud.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/memory_blog/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
